<include file="public/header" title="订单详情" body="g4"/>
<include file="public/header_nav" title="订单详情" href="javascript:history.back(-1)"/>

<div class="edit_gtfix">
        <div class="namephone fl">
            <div class="top">
                <div class="le fl">{$order_info.consignee}</div>
                <div class="lr fl">{$order_info.mobile}</div>
            </div>
            <div class="bot">
                <i class="dwgp"></i>
                <span>{$region_list[$order_info['province']]},{$region_list[$order_info['city']]},{$region_list[$order_info['district']]},{$order_info.address}</span>
            </div>
        </div>
        <div class="fr youjter">
        </div>
        <div class="ttrebu">
            <img src="__STATIC__/images/tt.png"/>
        </div>
</div>
<div class="packeg p">
    <div class="maleri30">
        <div class="fl">
            <if condition="$order_info.order_prom_type eq 4">
                <h1><span >订单类型：</span><span class="bgnum"></span><span>预售订单</span></h1>
            </if>
            <h1></h1>
        </div>
        <div class="fr">
            <span>{$order_info.order_status_desc}</span>
        </div>
    </div>
</div>
<!--订单商品列表-s-->
<div class="ord_list p">
    <div class="maleri30">
        <volist name="order_info.goods_list" id="good">
            <a href="{:U('Mobile/Goods/goodsInfo',array('id'=>$good[goods_id]))}">
                <div class="shopprice">
                    <div class="img_or fl">
                        <img src="{$good[goods_id]|goods_thum_images=100,100}"/>
                    </div>
                    <div class="fon_or fl">
                        <h2 class="similar-product-text">{$good[goods_name]} {$good[goods_id]}</h2>
                        <div><span class="bac">{$good['spec_key_name']}</span></div>
                    </div>
                    <div class="price_or fr">
                        <p><span>￥</span><span>{$good['member_goods_price']}</span></p>
                        <p>x{$good['goods_num']}</p>
                    </div>
                </div>
            </a>
        </volist>
    </div>
</div>
<!--订单商品列表-e-->
<div class="qqz">
    <div class="maleri30">
        <a href="tel:{$tpshop_config['shop_info_phone']}">联系客服</a>
        <if condition="$order_info.cancel_btn eq 1">
            <a class="closeorder_butt" >取消订单</a>
        </if>
    </div>
</div>
<div class="information_dr ma-to-20">
    <div class="maleri30">
        <div class="tit">
            <h2>基本信息</h2>
        </div>
        <div class="xx-list">
            <p class="p">
                <span class="fl">订单编号</span>
                <span class="fr">{$order_info.order_sn}</span>
            </p>
            <p class="p">
                <span class="fl">下单时间</span>
                <span class="fr"><span>{:date('Y-m-d  H:i:s', $order_info.add_time)}</span></span>
            </p>
            <p class="p">
                <span class="fl">收货地址</span>
                <span class="fr">{$region_list[$order_info[province]]}&nbsp;{$region_list[$order_info[city]]}&nbsp;{$region_list[$order_info[district]]}&nbsp;{$order_info[address]}</span>
            </p>
            <p class="p">
                <span class="fl">收货人</span>
                <span class="fr"><span>{$order_info.consignee}</span><span>{$order_info.mobile}</span></span>
            </p>
            <p class="p">
                <span class="fl">支付方式</span>
                <span class="fr">{$order_info.pay_name}</span>
            </p>
            <p class="p">
                <span class="fl">配送方式</span>
                <span class="fr">{$order_info.shipping_name}</span>
            </p>
            <p class="p">
                <span class="fl">买家留言</span>
                <span class="fr">{$order_info.user_note}</span>
            </p>
        </div>
    </div>
</div>
<div class="information_dr ma-to-20">
    <div class="maleri30">
        <div class="tit">
            <h2>价格信息</h2>
        </div>
        <div class="xx-list">
            <p class="p">
                <span class="fl">商品总价</span>
                <span class="fr"><span>￥</span><span>{$order_info.goods_price}</span>元</span>
            </p>
            <p class="p">
                <span class="fl">运费</span>
                <span class="fr"><span>￥</span><span>{$order_info.shipping_price}</span>元</span>
            </p>
            <p class="p">
                <span class="fl">优惠券</span>
                <span class="fr"><span>-￥</span><span>{$order_info.coupon_price}</span>元</span>
            </p>
            <p class="p">
                <span class="fl">积分</span>
                <span class="fr"><span>-￥</span><span>{$order_info.integral_money}</span>元</span>
            </p>
            <p class="p">
                <span class="fl">余额</span>
                <span class="fr"><span>-￥</span><span>{$order_info.user_money}</span>元</span>
            </p>
            <p class="p">
                <span class="fl">活动优惠</span>
                <span class="fr"><span>-￥</span><span>{$order_info.order_prom_amount}</span>元</span>
            </p>
            <p class="p">
                <span class="fl">实付金额</span>
                <span class="fr red"><span>￥</span><span>{$order_info.order_amount}</span>元</span>
            </p>
        </div>
    </div>
</div>

<!--取消订单-s-->
<div class="losepay closeorder" style="display: none;">
    <div class="maleri30">
        <p class="con-lo">取消订单后,存在促销关系的子订单及优惠可能会一并取消。是否继续？</p>
        <div class="qx-rebd">
            <a class="ax">取消</a>
            <if condition="$order_info.pay_status eq 0">
                <a class="are" onclick="cancel_order({$order_info.order_id})">确定</a>
            </if>
            <if condition="$order_info.pay_status eq 1">
                <a class="are" href="{:U('Order/refund_order', ['order_id'=>$order_info['order_id']])}">取消订单</a>
            </if>
        </div>
    </div>
</div>
<!--取消订单-e-->

<div class="mask-filter-div" style="display: none;"></div>

<!--底部支付栏-s-->
<div class="payit ma-to-20">
    <!--<div class="fl">-->
            <!--<p><span class="pmo">实付金额：</span>-->
                <!--<span>￥</span><span>{$order_info.order_amount+$order_info.shipping_price}</span>-->
            <!--</p>-->
            <!--<p class="lastime"><span>付款剩余时间：</span><span id="lasttime"></span></p>-->
            <!--&lt;!&ndash;<p class="deel"><a href="{:U('Mobile/User/order_del',array('order_id'=>$order_info.order_id))}">删除订单</a></p>&ndash;&gt;-->
    <!--</div>-->
    <div class="fr s">
        <if condition="$order_info.pay_btn eq 1">
            <a href="{:U('Mobile/Cart/cart4',array('order_id'=>$order_info['order_id']))}">立即付款</a>
            <else/>
            <a>{$order_info.order_status_desc}</a>
        </if>
        <if condition="$order_info.receive_btn eq 1">
            <a href="{:U('Mobile/User/order_confirm',array('id'=>$order_info['order_id']))}">收货确认</a>
        </if>
        <if condition="$order_info.shipping_btn eq 1">
            <a href="{:U('Mobile/User/express',array('order_id'=>$order_info['order_id']))}" >查看物流</a>
        </if>
        <if condition="$order_info.order_prom_type eq 4 AND $order_info.pay_status eq 2 AND $order_info.pre_sell_is_finished eq 1 AND (time() egt $order_info.pre_sell_retainage_start AND time() elt $order_info.pre_sell_retainage_end)">
            <a class="ddn3" style="margin-top:20px;" href="{:U('/Home/Cart/cart4',array('order_id'=>$order_info[order_id]))}'">支付尾款</a>
        </if>
    </div>
</div>
<!--底部支付栏-d-->

<script type="text/javascript">
    //取消订单按钮
    $('.closeorder_butt').click(function(){
        $('.mask-filter-div').show();
        $('.losepay').show();
    })
    //取消取消订单
    $('.qx-rebd .ax').click(function(){
        $('.mask-filter-div').hide();
        $('.losepay').hide();
    })

    //确认取消订单
    function cancel_order(id){
        $.ajax({
            type: 'GET',
            dataType:'JSON',
            url:"/index.php?m=Mobile&c=User&a=cancel_order&id="+id,
            success:function(data){
                if(data.code == 1){
                    layer.open({content:data.msg,time:2});
                    location.href = "/index.php?m=Mobile&c=User&a=order_detail&id="+id;
                }else{
                    layer.open({content:data.msg,time:2});
                    location.href = "/index.php?m=Mobile&c=User&a=order_detail&id="+id;
                    return false;
                }
            },
            error:function(){
                layer.open({content:'网络异常，请稍后重试',time:3});
            },
        });
        $('.mask-filter-div').hide();
        $('.losepay').hide();
    }


    //        $('.loginsingup-input .lsu i').click(function(){
    //            $(this).toggleClass('eye');
    //            if ($(this).hasClass('eye')) {
    //                $(this).siblings('input').attr('type','text')
    //            } else{
    //                $(this).siblings('input').attr('type','password')
    //            }
    //        });
</script>
</body>
</html>
